package com.sanri.buildingblock.exportcenter.remote;

import com.dtflys.forest.annotation.Address;
import com.sanri.buildingblock.exportcenter.configs.EnvAddressSource;
import com.sanri.buildingblock.exportcenter.enums.TaskStatus;

/**
 * @description:
 * @author: huangzhengri
 * @time: 2023-04-17 10:20
 */
@Address(source = EnvAddressSource.class)
public interface TaskRuntime {

    /**
     * 启动一个导入或导出任务实例
     * @param taskInstance
     */
    String startInstance(String uniqueId, String fileLocation);

    /**
     * 任务实例同步进度
     * @param instanceId
     * @param process
     */
    boolean setProcess(String instanceId, float process);

    /**
     * 任务实例同步状态
     * @param instanceId
     * @param taskStatus
     */
    boolean setStatus(String instanceId, TaskStatus taskStatus);
}
